<style>
.store-detail{
	display: flex;
	flex-direction: column;
	flex: 1;
	padding-bottom: 50px;
}
.topimg{
	text-align: center;
	padding: 60upx;
}
.topimg image{
	width: 140upx;
	height: 140upx;
}
.detail-txt{
	display: flex;
	flex-direction: row;
	padding: 6upx 0;
	border-bottom: 1upx solid #e6e6e6;
}
.detail-txt .item{
	/* display: flex;
	flex: 1;
	flex-direction: column;
	align-items:center; */
	position: relative;
	width: 33.333%;
	text-align: center;
}
.detail-txt .item .border{
	position: absolute;
	right: 0;
	top: 50%;
	margin-top: -25upx;
	height: 50upx;
	width: 3upx;
	background: #e6e6e6;
}
.item .sub{
	padding: 0 18upx;
	overflow: hidden;
	text-overflow:ellipsis;
	white-space: nowrap;
}
.detail-content{
	padding: 30upx 40upx;
	text-align: left;
}
.detail-content .title{
	
}
.detail-content .con{
	display: flex;
    flex: 1;
	flex-direction: column;
}
.btn-box{
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
}
.btn-box button{
	border-radius: 0;
	background: #0faeff;
}
.nomore{
	text-align: center;
}
.list-box{
	padding: 0 10px;
}
.uni-media-list{
	display: flex;
	align-items: center;
}
.uni-list-cell:after {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    left: 0;
}
.lease-btn{
	font-size: 28upx;
}
.title{
	margin-bottom: 20upx;
	font-size: 36upx;
}
</style>
<template>
	<view class="store-detail">
		<div class="topimg">
			<image :src="store.logo" mode=""></image>
			<div class="title">{{store.name}}</div>
		</div>
		<div class="detail">
			<div class="detail-txt">
				
				<div class="item">
					<div class="border"></div>
					<div>主营业务</div>
					<div class="sub">{{store.content}}</div>
				</div>
				<div class="item">
					<div class="border"></div>
					<div>联系电话</div>
					<div class="sub">{{store.tel}}</div>
				</div>
				<div class="item">
					<div>
						<uni-icon type="location-filled" size="15" color="#999"></uni-icon>地址
					</div>
					<div class="sub">{{store.addr}}</div>
				</div>
			</div>
			<div class="detail-content">
				<button type="primary" @click="toPay">店内消费</button>
			</div>
		</div>
		
	</view>
</template>

<script>
	import {
	    mapState,
	    mapMutations
	} from 'vuex'
	
	export default {
		data() {
			return {
				money:'',
				bid:'',
				coupon:0,
				store:{}
			};
		},
		computed:{
		    ...mapState(['userInfo'])
		},
		methods:{
			toPay(){
				uni.navigateTo({
					url:'payStore?bid='+this.bid
				})
			},
			getStore(){
				let that = this
				uni.request({
					url: this.httpUrl + 'business/list4Page',
					method: 'POST',
					header: {
						'content-type': 'application/x-www-form-urlencoded'
					},
					data: {
						bid:that.bid,
						pageNum:1,
						pageSize:1
					},
					success: (res) => {
						console.log(res)
						if (res.data.code == 1) {
							that.store = res.data.data.data[0]
						} else {
							uni.showToast({
								title: res.data.msg,
								icon: 'none',
								mask: true
							})
						}
					}
				})
			}
		},
		onLoad(options) {
			console.log(options);
			this.bid = options.bid
			this.getStore()
		}
	}
</script>


